module.exports={
    setResultData:function(set,data){
        var Sets=set || {"key":'a'};
        let Data=data||[{'a':1,'b':2}];
        let result=[];
        for(var i=0;i<Data.length;i++){
            let val=Data[i];
            var pastResult = {};
            Object.getOwnPropertyNames(Sets).forEach(function(key){
                let bn=val[Sets[key]];
                pastResult[key]=bn;
           })
           result[i]=pastResult;
        }
        return result;
    },
    getArrObjFeild:function(arr,feild){
            let result=[];
        for(let i=0;i<arr.length;i++){
            result[i]=arr[i][feild];
          }
          return result;
    },
};